const inflection = require("inflection");
module.exports = options => {
    return (req, res, next) => {
        const modelName = inflection.classify(req.params.resource); //复数转单数类名
        req.commonModel = require(`../models/${modelName}`);
        next();
    };
};
